home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / util / shell / ShellScr.lha / ShellScr / src / defarg.asm < prev    next >
Encoding:
Assembly Source File  |  1998-04-10  |  330 b   |  12 lines

  1. ; a shorter (code and execution-wise) replacement for 'IF x THEN x ELSE y'.
  2. ; instead of 'IF x THEN x ELSE y', write 'defarg(x,y)'
  3. ; particularly useful for using 'defaults' to arguments in ReadArgs().
  4. ; eg say_hello(defarg(arg[HELLO], 'Kevin'))
  5.  
  6.     xdef    defarg_ii
  7. defarg_ii
  8.     move.l    8(sp),d0
  9.     bne.s    .done
  10.     move.l    4(sp),d0
  11. .done    rts
  12.